package com.zhuangqi.algorithm.template;

/**
 * 基础模板
 */
public class BaseTemplate {

    /**
     * i与j交换位置
     */
    public static void exch(Comparable[] a,int i,int j) {
        Comparable t = a[j];
        a[j] = a[i];
        a[i] = t;
    }

    /**
     * v比w小
     * @return true
     */
    public static boolean less(Comparable v,Comparable w) {
        return v.compareTo(w) < 0;
    }

}
